package com.ks.app.ad.hibernate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * KsAd entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "KS_AD")
public class KsAd implements java.io.Serializable {

	// Fields
	private static final long serialVersionUID = 9165958015560236656L;
	
	private long adid;//主键ID
	private String title;//广告名称
	private String url;//广告ＵＲＬ地址
	private long isshow;//有效性 1：开放  0：关闭
	private long orderid;//优先级 序号越小 广告排列越前
	private String startdate;//广告开始日期
	private String enddate;//广告结束日期
	private String starttime;//广告当天起始时间
	private String endtime;//广告当天结束时间
	private String username;//广告注册所有人
	 private String province;//广告开通的省份
	// Constructors

	/** default constructor */
	public KsAd() {
	}

	/** minimal constructor */
	public KsAd(long adid) {
		this.adid = adid;
	}

	/** full constructor */
	public KsAd(long adid, String title, String url, long isshow,
			long orderid, String startdate, String enddate,
			String starttime, String endtime,String province) {
		this.adid = adid;
		this.title = title;
		this.url = url;
		this.isshow = isshow;
		this.orderid = orderid;
		this.startdate = startdate;
		this.enddate = enddate;
		this.starttime = starttime;
		this.endtime = endtime;
		this.province = province;
	}

	// Property accessors
	@Id
	@SequenceGenerator(name = "KS_AD_LOG", sequenceName = "KS_AD_SEQ", allocationSize = 1, initialValue = 0)
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "KS_AD_LOG")
	@Column(name = "ADID", unique = true, nullable = false, precision = 22, scale = 0)
	public long getAdid() {
		return this.adid;
	}

	public void setAdid(long adid) {
		this.adid = adid;
	}

	@Column(name = "TITLE")
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "URL")
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "ISSHOW", precision = 22, scale = 0)
	public long getIsshow() {
		return this.isshow;
	}

	public void setIsshow(long isshow) {
		this.isshow = isshow;
	}

	@Column(name = "ORDERID", precision = 22, scale = 0)
	public long getOrderid() {
		return this.orderid;
	}

	public void setOrderid(long orderid) {
		this.orderid = orderid;
	}

	@Column(name = "STARTDATE")
	public String getStartdate() {
		return this.startdate;
	}

	public void setStartdate(String startdate) {
		this.startdate = startdate;
	}

	@Column(name = "ENDDATE")
	public String getEnddate() {
		return this.enddate;
	}

	public void setEnddate(String enddate) {
		this.enddate = enddate;
	}

	@Column(name = "STARTTIME")
	public String getStarttime() {
		return this.starttime;
	}

	public void setStarttime(String starttime) {
		this.starttime = starttime;
	}

	@Column(name = "ENDTIME")
	public String getEndtime() {
		return this.endtime;
	}

	public void setEndtime(String endtime) {
		this.endtime = endtime;
	}
	@Column(name = "USERNAME")
	public String getUsername() {
		return this.username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name = "PROVINCE")
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
}